<template>
  <div class="div1">
    <div class="div2">
      <div class="div3">
        <img
          class="img1"
          :src="
            'http://localhost:3000' + Store.NowLoginuser.avator ||
            '/userimg.jpg'
          "
          alt=""
        />
        <div
          style="display: flex; flex-direction: column; margin-bottom: 0.2rem"
        >
          <span>admin</span>
          <span>管理员</span>
        </div>
      </div>
      <div class="div4">
        <span
          style="
            margin: 0.2rem 0.2rem;
            border-bottom: 2px solid rgb(54, 54, 54);
            font-weight: 800;
          "
          >个人信息</span
        >
        <userform></userform>
      </div>
    </div>
  </div>
</template>

<script setup>
import userform from "./userform.vue";
import { useStore } from "../../../stores/counter";
const Store = useStore();
</script>

<style scoped>
.div1 {
  width: 100%;
  height: calc(100vh - 50px);
  background: white;
}
.img1 {
  height: 2rem;
  width: 2rem;
  border-radius: 50%;
  margin-top: 0.2rem;
}
.div2 {
  width: 100%;
  display: flex;
}
.div3 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 4rem;
  height: 4rem;
  background: rgba(255, 255, 255, 1);
  margin: 0.4rem 0.2rem;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
  border-radius: 8px;
}
.div4 {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin: 0.4rem 0.2rem;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
  height: 80%;
  border-radius: 8px;
}
@media (max-width: 800px) {
  .div3 {
    margin: 0;
    box-shadow: 0 0 0px;
    width: 100%;
  }
  .div2 {
    flex-direction: column;
  }
  .div4 {
    box-shadow: 0 0 0px;
    margin: 0;
  }
}
.avatar-uploader .avatar {
  width: 178px;
  height: 178px;
  display: block;
}

.avatar-uploader .el-upload {
  border: 1px dashed var(--el-border-color);
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--el-transition-duration-fast);
}

.avatar-uploader .el-upload:hover {
  border-color: var(--el-color-primary);
}

.el-icon.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: 178px;
  height: 178px;
  text-align: center;
}
</style>